package com.common.entity;

/**
 * @create 2020-11-21 17:47
 */
public enum Code {
    REQUEST_SUCCESS(200, "请求成功"),
    REQUEST_ERROR(500, "请求失败"),
    REGISTE_SUCCESS(200, "注册成功"),
    REGISTER_ERROR(500, "注册失败"),
    LOGIN_SUCCESS(200, "登录成功"),
    LOGIN_ERROR(500, "登录失败"),
    PARAM_ERROR(500, "参数不正确"),
    NO_Authenticate(401, "未认证"),
    NO_Authorize(406, "未授权"),
    UNKNOWN_ERROR(202, "程序未知错误"),
    RUN_Exception(888, "程序运行时错误"),
    CHECK_Exception(777, "程序受查错误"),
    UNKNOWN_Exception(800, "未知异常");

    private Integer code;
    private String message;

    Code(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
